<?php
/**
 * TOP API: taobao.crm.rules.get request
 * 
 * @author auto create
 * @since 1.0, 2012-04-17 12:36:56
 */
class CrmRulesGetRequest
{
    /** 
     * 当前显示第几页，如果current_page超过页码范围或者小于页码范围，将直接返回空白页
     **/
    private $currentPage;
    
    /** 
     * 一页返回的记录的个数
     **/
    private $pageSize;
    
    private $apiParas = array();
    
    public function setCurrentPage($currentPage)
    {
        $this->currentPage = $currentPage;
        $this->apiParas["current_page"] = $currentPage;
    }

    public function getCurrentPage()
    {
        return $this->currentPage;
    }

    public function setPageSize($pageSize)
    {
        $this->pageSize = $pageSize;
        $this->apiParas["page_size"] = $pageSize;
    }

    public function getPageSize()
    {
        return $this->pageSize;
    }

    public function getApiMethodName()
    {
        return "taobao.crm.rules.get";
    }
    
    public function getApiParas()
    {
        return $this->apiParas;
    }
    
    public function check()
    {
        
        RequestCheckUtil::checkNotNull($this->currentPage,"currentPage");
        RequestCheckUtil::checkMaxValue($this->currentPage,1000000,"currentPage");
        RequestCheckUtil::checkMinValue($this->currentPage,1,"currentPage");
        RequestCheckUtil::checkMaxValue($this->pageSize,100,"pageSize");
        RequestCheckUtil::checkMinValue($this->pageSize,1,"pageSize");
    }
}
